<ul id="team-members" class="list-unstyled">
  <li>
    <img class="rounded-circle" width=35 height=35 src="<%= @user.image || Logflare.Auth.gen_gravatar_link(@user.email) %>" alt="<%= @user.name || @user.email %>">
    <%= link(@user.name || @user.email, to: "mailto:#{@user.email}") %>
    <small><%= if assigns[:team_user], do: "owner", else: "owner, you" %></small>
    </li>
    <%= for member <- @team.team_users do %>
      <li>
        <img class="rounded-circle" width=35 height=35 src="<%= member.image || Logflare.Auth.gen_gravatar_link(member.email) %>" alt="<%= member.name || member.email %>">
        <%= link(member.name || member.email, to: "mailto:#{member.email}")%>
        <%= if assigns[:team_user] do %>
          <%= if member.provider_uid == @team_user.provider_uid do %>
            <small>you</small>
          <% else %>
            <%= link to: Routes.team_user_path(@conn, :delete, member.id), class: "dashboard-links", method: :delete do %>
              <i class="fa fa-trash"></i>
            <% end %>
          <% end %>
        <% else %>
          <%= link to: Routes.team_user_path(@conn, :delete, member.id), class: "dashboard-links", method: :delete do %>
            <i class="fa fa-trash"></i>
          <% end %>
        <% end %>
      </li>
    <% end %>
  </ul>
